package com.study.model.ctmodel;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import lombok.Data;
import org.springframework.data.annotation.Id;

import java.math.BigDecimal;
import java.util.Date;
import java.util.UUID;

@Data
@Schema(description = "CT浓度采样表")
@TableName("ct_concentration_sample")
public class CTConcentrationSampleTable {

    private static final long serialVersionUID = 1L;

    @jakarta.persistence.Id
    @Schema(description = "主键ID")
    @TableId(type = IdType.AUTO)
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Schema(description = "UUID")
    @TableField("uuid")
    private String uuid = UUID.randomUUID().toString();

    @Schema(description = "批次名称")
    @TableField("batchname")
    private String batchname;

    @Schema(description = "R1 值")
    @TableField("R1")
    private BigDecimal R1;

    @Schema(description = "G1 值")
    @TableField("G1")
    private BigDecimal G1;

    @Schema(description = "B1 值")
    @TableField("B1")
    private BigDecimal B1;

    @Schema(description = "R2 值")
    @TableField("R2")
    private BigDecimal R2;

    @Schema(description = "G2 值")
    @TableField("G2")
    private BigDecimal G2;

    @Schema(description = "B2 值")
    @TableField("B2")
    private BigDecimal B2;

    @Schema(description = "T值")
    @TableField("TValue")
    private BigDecimal TValue;

    @Schema(description = "C值")
    @TableField("CValue")
    private BigDecimal CValue;

    @Schema(description = "TC ΔE2000")
    @TableField("TC_deltaE2000")
    private BigDecimal TC_deltaE2000;

    @Schema(description = "TC 比值")
    @TableField("TC_Ratio")
    private BigDecimal TC_Ratio;

    @Schema(description = "y 值")
    @TableField("y")
    private BigDecimal y;

    @Schema(description = "文件路径")
    @TableField("fileurl")
    private String fileurl;

    @Schema(description = "逻辑删除(1:已删除，0:未删除)", defaultValue = "0")
    @JsonIgnore
    @TableLogic
    @TableField("isDeleted")
    private Integer isDeleted = 0;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("created_at")
    private Date createdAt;

    @Schema(description = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("updated_at")
    private Date updatedAt;
}